﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AvalonDock.Layout;

namespace Draco.OWF.Studio.Designer
{
    public class LayoutDesigerWin : LayoutDocument
    {
        public IProcess ProcessDefinition {get;private set;}
        public DesignerWin DesignerWin { get; private set; }

        public LayoutDesigerWin()
        {
            this.Title = "No Named";
        }

        public void LoadProcess(IProcess process)
        {
            if (process == null)
                throw new ArgumentNullException("processDefiniton is null");

            this.ProcessDefinition = process;
            this.DesignerWin = new DesignerWin(process);
            this.Content = this.DesignerWin;
            this.DesignerWin.LoadProcessDefinition();
            this.Title = process.DisplayName;
        }
    }
}
